inherited dm_fornecedor: Tdm_fornecedor
  OldCreateOrder = True
  Left = 592
  Top = 257
  inherited sqlConsulta: TSQLQuery
    SQL.Strings = (
      'select'
      '    f.COD_FORNECEDOR,'
      '    f.TIPO_PESSOA,'
      '    f.RAZAO_SOCIAL,'
      '    f.NOME_FANTASIA,'
      '    f.SITUACAO,'
      '    case'
      '        when f.situacao = '#39'True'#39' then '#39'ATIVO'#39' else '#39'INATIVO'#39
      '    end as SITUACAO_DESC,'
      '    f.CNPJ,'
      '    f.IE,'
      '    f.TIPO_EMPRESA,'
      '    f.EMAIL,'
      '    f.TEL_COMERCIAL,'
      '    f.TEL_CELULAR,'
      '    f.PRAZO_COMPRA,'
      '    f.CEP,'
      '    f.ENDERECO,'
      '    f.NUMERO,'
      '    f.COMPLEMENTO,'
      '    f.LOCALIDADE,'
      '    f.BAIRRO,'
      '    f.UF,'
      '    f.WEBSITE,'
      '    f.OBS,'
      '    f.DATA_CAD,'
      '    f.DATA_ALTERACAO,'
      '    f.responsavel,'
      '    f.responsavel_telefone,'
      '    f.responsavel_celular,'
      '    f.responsavel_email'
      'from fornecedor f')
  end
  inherited cdsConsulta: TClientDataSet
    object cdsConsultaCOD_FORNECEDOR: TIntegerField
      FieldName = 'COD_FORNECEDOR'
      Required = True
    end
    object cdsConsultaTIPO_PESSOA: TStringField
      FieldName = 'TIPO_PESSOA'
      Required = True
      Size = 10
    end
    object cdsConsultaRAZAO_SOCIAL: TStringField
      FieldName = 'RAZAO_SOCIAL'
      Required = True
      Size = 50
    end
    object cdsConsultaNOME_FANTASIA: TStringField
      FieldName = 'NOME_FANTASIA'
      Required = True
      Size = 100
    end
    object cdsConsultaSITUACAO: TStringField
      FieldName = 'SITUACAO'
      Required = True
      Size = 5
    end
    object cdsConsultaSITUACAO_DESC: TStringField
      FieldName = 'SITUACAO_DESC'
      Required = True
      FixedChar = True
      Size = 7
    end
    object cdsConsultaCNPJ: TStringField
      FieldName = 'CNPJ'
      Required = True
    end
    object cdsConsultaIE: TStringField
      FieldName = 'IE'
    end
    object cdsConsultaTIPO_EMPRESA: TStringField
      FieldName = 'TIPO_EMPRESA'
      Size = 50
    end
    object cdsConsultaEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 100
    end
    object cdsConsultaTEL_COMERCIAL: TStringField
      FieldName = 'TEL_COMERCIAL'
    end
    object cdsConsultaTEL_CELULAR: TStringField
      FieldName = 'TEL_CELULAR'
    end
    object cdsConsultaPRAZO_COMPRA: TStringField
      FieldName = 'PRAZO_COMPRA'
      Size = 30
    end
    object cdsConsultaCEP: TStringField
      FieldName = 'CEP'
      Size = 10
    end
    object cdsConsultaENDERECO: TStringField
      FieldName = 'ENDERECO'
      Size = 50
    end
    object cdsConsultaNUMERO: TStringField
      FieldName = 'NUMERO'
      Size = 5
    end
    object cdsConsultaCOMPLEMENTO: TStringField
      FieldName = 'COMPLEMENTO'
      Size = 30
    end
    object cdsConsultaLOCALIDADE: TStringField
      FieldName = 'LOCALIDADE'
      Size = 30
    end
    object cdsConsultaBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 30
    end
    object cdsConsultaUF: TStringField
      FieldName = 'UF'
      Size = 5
    end
    object cdsConsultaWEBSITE: TStringField
      FieldName = 'WEBSITE'
      Size = 100
    end
    object cdsConsultaOBS: TStringField
      FieldName = 'OBS'
      Size = 10000
    end
    object cdsConsultaDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsConsultaRESPONSAVEL: TStringField
      FieldName = 'RESPONSAVEL'
      Size = 100
    end
    object cdsConsultaRESPONSAVEL_TELEFONE: TStringField
      Alignment = taCenter
      FieldName = 'RESPONSAVEL_TELEFONE'
      Size = 15
    end
    object cdsConsultaRESPONSAVEL_CELULAR: TStringField
      Alignment = taCenter
      FieldName = 'RESPONSAVEL_CELULAR'
      Size = 15
    end
    object cdsConsultaRESPONSAVEL_EMAIL: TStringField
      FieldName = 'RESPONSAVEL_EMAIL'
      Size = 100
    end
  end
  inherited qryPKChave: TSQLQuery
    SQL.Strings = (
      'SELECT GEN_ID(gen_fornecedor,1)'
      'FROM RDB$DATABASE')
  end
  inherited cdsRegistro: TClientDataSet
    OnReconcileError = cdsRegistroReconcileError
    object cdsRegistroCOD_FORNECEDOR: TIntegerField
      FieldName = 'COD_FORNECEDOR'
      Required = True
    end
    object cdsRegistroTIPO_PESSOA: TStringField
      FieldName = 'TIPO_PESSOA'
      Required = True
      Size = 10
    end
    object cdsRegistroRAZAO_SOCIAL: TStringField
      FieldName = 'RAZAO_SOCIAL'
      Required = True
      Size = 50
    end
    object cdsRegistroNOME_FANTASIA: TStringField
      FieldName = 'NOME_FANTASIA'
      Required = True
      Size = 100
    end
    object cdsRegistroSITUACAO: TStringField
      FieldName = 'SITUACAO'
      Required = True
      Size = 5
    end
    object cdsRegistroCNPJ: TStringField
      FieldName = 'CNPJ'
      Required = True
    end
    object cdsRegistroIE: TStringField
      FieldName = 'IE'
    end
    object cdsRegistroTIPO_EMPRESA: TStringField
      FieldName = 'TIPO_EMPRESA'
      Size = 50
    end
    object cdsRegistroEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 100
    end
    object cdsRegistroTEL_COMERCIAL: TStringField
      FieldName = 'TEL_COMERCIAL'
    end
    object cdsRegistroTEL_CELULAR: TStringField
      FieldName = 'TEL_CELULAR'
    end
    object cdsRegistroPRAZO_COMPRA: TStringField
      FieldName = 'PRAZO_COMPRA'
      Size = 30
    end
    object cdsRegistroCEP: TStringField
      FieldName = 'CEP'
      Size = 10
    end
    object cdsRegistroENDERECO: TStringField
      FieldName = 'ENDERECO'
      Size = 50
    end
    object cdsRegistroNUMERO: TStringField
      FieldName = 'NUMERO'
      Size = 5
    end
    object cdsRegistroCOMPLEMENTO: TStringField
      FieldName = 'COMPLEMENTO'
      Size = 30
    end
    object cdsRegistroLOCALIDADE: TStringField
      FieldName = 'LOCALIDADE'
      Size = 30
    end
    object cdsRegistroBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 30
    end
    object cdsRegistroUF: TStringField
      FieldName = 'UF'
      Size = 5
    end
    object cdsRegistroWEBSITE: TStringField
      FieldName = 'WEBSITE'
      Size = 100
    end
    object cdsRegistroOBS: TStringField
      FieldName = 'OBS'
      Size = 10000
    end
    object cdsRegistroDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object cdsRegistroDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsRegistroRESPONSAVEL: TStringField
      FieldName = 'RESPONSAVEL'
      Size = 100
    end
    object cdsRegistroRESPONSAVEL_TELEFONE: TStringField
      Alignment = taCenter
      FieldName = 'RESPONSAVEL_TELEFONE'
      Size = 15
    end
    object cdsRegistroRESPONSAVEL_CELULAR: TStringField
      Alignment = taCenter
      FieldName = 'RESPONSAVEL_CELULAR'
      Size = 15
    end
    object cdsRegistroRESPONSAVEL_EMAIL: TStringField
      FieldName = 'RESPONSAVEL_EMAIL'
      Size = 100
    end
  end
  inherited sqlRegistro: TSQLQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'codigo'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '    f.COD_FORNECEDOR,'
      '    f.TIPO_PESSOA,'
      '    f.RAZAO_SOCIAL,'
      '    f.NOME_FANTASIA,'
      '    f.SITUACAO,'
      '    f.CNPJ,'
      '    f.IE,'
      '    f.TIPO_EMPRESA,'
      '    f.EMAIL,'
      '    f.TEL_COMERCIAL,'
      '    f.TEL_CELULAR,'
      '    f.PRAZO_COMPRA,'
      '    f.CEP,'
      '    f.ENDERECO,'
      '    f.NUMERO,'
      '    f.COMPLEMENTO,'
      '    f.LOCALIDADE,'
      '    f.BAIRRO,'
      '    f.UF,'
      '    f.WEBSITE,'
      '    f.OBS,'
      '    f.DATA_CAD,'
      '    f.DATA_ALTERACAO,'
      '    f.responsavel,'
      '    f.responsavel_telefone,'
      '    f.responsavel_celular,'
      '    f.responsavel_email'
      'from FORNECEDOR f'
      'where f.cod_fornecedor = :codigo')
  end
  object sqlConsultaSituacao: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQL.Strings = (
      'select distinct'
      
        '    (select count(a.cod_fornecedor) from fornecedor a where a.si' +
        'tuacao = '#39'True'#39') as Ativo,'
      
        '    (select count(b.cod_fornecedor) from fornecedor b where b.si' +
        'tuacao = '#39'False'#39') as Inativo'
      'from fornecedor i')
    SQLConnection = dmGeral.SQLConnectionBD
    Left = 259
    Top = 18
    object sqlConsultaSituacaoATIVO: TIntegerField
      FieldName = 'ATIVO'
    end
    object sqlConsultaSituacaoINATIVO: TIntegerField
      FieldName = 'INATIVO'
    end
  end
end
